package com.lzhsite.technology.designPattern.mediator.ColleagueDemo;

public class ClientForColleagueDemo
{
    public static void main(String[] args)
    {
        AbstractMediator mediator = new Mediator();
        ColleagueA colleagueA = new ColleagueA();
        ColleagueB colleagueB = new ColleagueB();
        mediator.addColleague("ColleagueA", colleagueA);
        mediator.addColleague("ColleagueB", colleagueB);
        colleagueA.self();
        colleagueA.out();
        System.out.println("合作愉快，任务完成");
        System.out.println();
        colleagueB.self();
        colleagueB.out();
        System.out.println("合作愉快，任务完成");
    }
}
